import request from "@/utils/request";

// 管理员-新增用户参数类型信息
export function adminAddParams(data) {
  return request({
    url: "/arbit/wcvariable/add",
    method: "post",
    data: data,
  });
}
//管理员-查询用户参数类型信息分页列表
export function adminReadParams(query) {
  return request({
    url: "/arbit/wcvariable/page",
    method: "get",
    params: query,
  });
}
// 管理员-通过ID修改用户参数类型信息
export function adminEditParams(data) {
  return request({
    url: "/arbit/wcvariable/edit",
    method: "put",
    data: data,
  });
}
// 管理员-通过ID删除用户参数类型信息
export function adminDelParams(id) {
  return request({
    url: "/arbit/wcvariable/delete/" + id,
    method: "delete",
  });
}
// 助手-新增参数数据
export function helperAddParams(data) {
  return request({
    url: "/arbit/wcvariable_user/add",
    method: "post",
    data: data,
  });
}
// 助手-通过ID修改用户参数关联
export function helperEditParams(data) {
  return request({
    url: "/arbit/wcvariable_user/edit",
    method: "put",
    data: data,
  });
}
// 查询用户参数关联分页列表
export function helperReadParams(query) {
  return request({
    url: "/arbit/wcvariable_user/page?variableId=1&variableType=1&variableName=&pageNum=1&pageSize=10",
    method: "get",
    params: query,
  });
}
// 管理员-(助手)-查询助手填写变量详情
export function adminReadParamsDetail(query) {
  return request({
    url: "/arbit/wcvariable/getVariableDetailsByType",
    method: "post",
    data: query,
  });
}
// 管理员-(助手)通过ID修改用户参数关联
export function adminEditParamsDetail(data) {
  return request({
    url: "/arbit/wcvariable_user/managerEdit",
    method: "post",
    data: data,
  });
}
// 管理员-(助手)新增用户参数关联
export function adminAddParamsDetail(data) {
  return request({
    url: "/arbit/wcvariable_user/managerAdd",
    method: "post",
    data: data,
  });
}
// 管理员-(助手)通过ID删除用户参数关联
export function adminDelParamsDetail(data) {
  return request({
    url: "/arbit/wcvariable_user/managerRemove",
    method: "POST",
    data: data,
  });
}
// 管理员-(助手)导出助手填写变量详情
export function adminExportParamsDetail(query) {
  return request({
    url: "/arbit/wcvariable/exportVariableDetailsByType",
    method: "post",
    data: query,
    responseType: "blob",
  });
}
